
<div id="border"> 
<form action="<?=site_url("users/goUpdateProfile")?>" method="post" name="Frmsignup" id="Frmsignup" enctype="multipart/form-data">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td valign="top">
          
        <table width="100%" border="0" align="center" id="usertitle">
          <tr>
            <td><h3 style=""><?=$Z_TRANS->value('title_update_profile')?></h3></td>
            <td align="right"><img src="<?=base_url();?>images/Secure_connection.gif" alt="" width="116" height="22" /></td>
          </tr>
        </table>
        <div id="register">
  	
		<div style="border-bottom:#CCC 1px solid; height:10px;">&nbsp;</div>
        
    	<?php if(isset($message_errors)){?><div class="error_message" style="color:#BD2031; line-height:18px;"><?=$message_errors;?></div><? }?>
      
          <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="38%" align="right" class="ttd"><br />
                <?=$Z_TRANS->value('title_email')?>:</td>
              <td colspan="2" class="ttd"><br />
              	<div class="bordrTextbox"><input name="txtEmail" type="text" class="textbox" id="txtEmail" value="<?php if(isset($_POST['txtEmail']))echo htmlspecialchars(set_value('txtEmail')); ?><? if(!isset($_POST['txtEmail'])){ echo htmlspecialchars($users["user_email"]);}?>" /></div>
              </td>
            </tr>
             <tr>
              <td align="right" class="ttd"><?=$Z_TRANS->value('title_name')?>:</td>
              <td width="17%" class="ttd">
              	<input name="txtUser" type="text" class="textbox" id="txtUser"  value="<?php if(isset($_POST['txtUser']))echo htmlspecialchars(set_value('txtUser')); ?><? if(!isset($_POST['txtUser'])){ echo htmlspecialchars($users["user_login"]);}?>" style="border:0; text-align:left" />

              </td>
              <td width="45%" class="ttd">
                <div class="profile_picture">
                <? $Z_USER = Zsession::getUserFromSession();
				   $str_path = str_replace("\\", "/", FCPATH);
				   $filename =$str_path."usr/".$Z_USER["user_id"]."/".$users['user_photo'];
					if($users["user_photo"]!="" && file_exists ($filename)){
                    	//echo $users["user_photo"];?>
                    <img src="<?=base_url();?>usr/<?=$Z_USER["user_id"]?>/<?=htmlspecialchars($users["user_photo"]);?>" height="80" align="absmiddle" />
                <? }else {?>
                    <img src="<?=base_url();?>images/People.png" height="80" align="absmiddle" />
                <? }?>
                    <p style="margin-top:10px"><?=$Z_TRANS->value('title_profile_picture')?></p>
 
                </div>
              </td>
             </tr>
             <tr>
              <td align="right" class="ttd"><?=$Z_TRANS->value('title_first_name')?>
                :</td>
              <td colspan="2" class="ttd"><div class="bordrTextbox"><input name="txtFrist" type="text" class="textbox" id="txtFrist"  value="<?php if(isset($_POST['txtFrist']))echo htmlspecialchars(set_value('txtFrist')); ?><? if(!isset($_POST['txtFrist'])){ echo htmlspecialchars($users["user_fname"]);}?>" /></div></td>
            </tr>
            <tr>
              <td align="right" class="ttd"><?=$Z_TRANS->value('title_last_name')?>
                :</td>
              <td colspan="2" class="ttd"><div class="bordrTextbox"><input name="txtLast" type="text" class="textbox" id="txtLast"  value="<?php if(isset($_POST['txtLast']))echo htmlspecialchars(set_value('txtLast')); ?><? if(!isset($_POST['txtLast'])){ echo htmlspecialchars($users["user_lname"]);}?>" /></div></td>
            </tr>
            <tr>
              <td align="right" class="ttd"><?=$Z_TRANS->value('title_phone')?>
                :</td>
              <td colspan="2" class="ttd"><div class="bordrTextbox"><input name="txtTel" type="text" class="textbox" id="txtTel" value="<?php if(isset($_POST['txtTel']))echo htmlspecialchars(set_value('txtTel')); ?><? if(!isset($_POST['txtTel'])){ echo htmlspecialchars($users["user_tel"]);}?>" /></div></td>
            </tr>
            <tr>
              <td align="right" class="ttd"><?=$Z_TRANS->value('title_locations')?>
                :</td>
              <td colspan="2" class="ttd">
              <div class="bordrTextbox">
              	<select name="cb_city" size="0" class="textbox" mosReq="0" mosLabel="City/Provinces"> 
                    <option value=""> </option> 
                    <?php foreach($getCityProvince->result() as $rowCity):
					    $selected = $rowCity->city_name==$users["city_name"] ? "selected" : "";
					?>
                    <option value="<?=$rowCity->city_id;?>" <?=$selected?>><?=$rowCity->city_name?></option>
                    <?php endforeach;?> 
                </select>
              </div>
              </td>
            </tr>
            
            <tr>
              <td align="right" class="ttd"></td>
              <td colspan="2"><br />Enter a question and answer to verify your indentity if you forget your <br />password<br /></td>
            </tr>
            
            <tr>
              <td align="right" class="ttd"><?=$Z_TRANS->value('title_question')?>
                :</td>
              <td colspan="2">
              <div class="bordrTextbox" style="width:411px;">
              	<select name="cboQuestion" style="width:411px; height:24px;"><?=$users["sec_question_id"]?>
                 <?php foreach($sec_question->result() as $rowSec):
                 	$selected = $rowSec->sec_question_id==$users["sec_question_id"] ? "selected" : "";?>
              	  	<option value="<?=$rowSec->sec_question_id;?>" <?=$selected?>><?=$rowSec->sec_question_text;?></option>
                 <?php endforeach;?>
                </select>
              </div>
              </td>
            </tr>
            
            <tr>
              <td align="right" class="ttd"><?=$Z_TRANS->value('title_answer')?>
                :</td>
              <td colspan="2"><div class="bordrTextbox" style="width:411px;"><input name="txtAn" type="text" class="textbox" id="txtAn" style="width:411px;" value="<?php if(isset($_POST['txtAn']))echo htmlspecialchars(set_value('txtAn')); ?><? if(!isset($_POST['txtAn'])){ echo htmlspecialchars($users["sec_answer"]);}?>"/></div></td>
            </tr>
             <tr>
              <td align="right" class="ttd" height="68"><span style="margin-top:10px">
                <?=$Z_TRANS->value('title_profile_picture')?>
                </span>:</td>
              <td colspan="2"><input name="image1" id="image1" type="file" /></td>
            </tr>               
            <tr>
              <td class="ttd">&nbsp;</td>
              <td height="68" colspan="2"><input type="button" value="<?=$Z_TRANS->value('title_back')?>" onclick="document.location='<? echo isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';?>'" /> <input type="submit" class="kh_button" name="update" id="update" value="<?=$Z_TRANS->value('title_update_profile')?>" /></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td colspan="2">&nbsp;</td>
            </tr>
          </table>
		
    </div>
        </td>
        <td width="254" valign="top">
			<?php include APPPATH."views/templates/common/right_content.php"; ?>
         </td>
         
      </tr>
  </table>
 </form>
</div>



